<div class="wrapper wrapper-content animated fadeInRight">
    <!-- PAGE CONTENT BEGINS -->
    <div class="row">
        <div class="col-xs-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>搜索</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="table-responsive">
                            <form class="form-search" method="get" action="<?=url('setting.city/index')?>"
                                  role="form">
                                <table>
                                    <tr>
                                        <td>省份:
                                            <select class="form-control" style="width:200px;" name="province_id">
                                                <option style="font-size: 2rem">请选择</option>
                                                     <?php foreach($province as $k=>$v) {?>
                                                           <option disabled class="form-control"><h3><?=$k?></h3></option>
                                                             <?php foreach($v as $val) { ?>
                                                                 <option  style="font-size: 2rem" <?=$search['province_id'] == $val['id'] ? 'selected' : ''?> value="<?=$val['id']?>">&nbsp;&nbsp;&nbsp;&nbsp;<?=$val['name']?></option>
                                                             <?php } ?>
                                                     <?php } ?>
                                            </select>
                                        </td>
                                        <td>城市名称:<input class="form-control" name="city_name" id="city_name" value="<?=$search['city_name']?>" type="text" placeholder="请输入城市名称" style=" width:200px"/></td>
                                        <td>
                                            <div class="input-group">
                                                <button type="submit" style="margin-top: 42%"
                                                        class="btn form-control btn-sm btn-primary">
                                                    搜索
                                                </button>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="ibox-content">
                <div class="row">
                    <div class="tableTools-container">
                        <a title="添加城市" href="<?=url('setting.city/create')?>" class="btn btn-sm btn-success"><i class=" fa fa-plus"></i>添加城市</a>
                    </div>
                    <div class="table-responsive">
                        <table id="simple-table" class="table table-striped">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>省份</th>
                                <th>城市名称</th>
                                <th>拼音（全拼）</th>
                                <th>拼音（首字母）</th>
                                <th>是否开通</th>
                                <th>行政区域个数</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                                <tbody>
                                <?php foreach($list as $val){ ?>
                                <tr>
                                    <td><?= $val->city_id ?></td>
                                    <td><?=empty(config('province')[$val->province_id]['name']) ? '' : config('province')[$val->province_id]['name']?></td>
                                    <td><?=$val->city_name?></td>
                                    <td><?=$val->pinyin?></td>
                                    <td><?=$val->initial?></td>
                                    <td><?=$val->is_open == 1 ? '<span class="label label-primary">已开通</span>' : '<span class="label label-danger">未开通</span>'?></td>
                                    <td><?=$val->area_num?>个&nbsp;<a style="padding: 3%;" class="btn btn-white" href="<?=url('setting.region/index',['city_id'=>$val->city_id,'type'=>3])?>" mini="load" w="96%" h="96%">编辑</a></td>
                                    <td>
                                        <div class="hidden-sm hidden-xs btn-group">
                                            <a title="编辑城市" href="<?=url('setting.city/edit','city_id='.$val->city_id)?>" class="btn btn-xs btn-info"><i class=" fa fa-edit bigger-120"></i>编辑</a>
                                            <a title="删除城市" mini="act" href="<?=url('publicmodel.city/delete','city_id='.$val->city_id)?>" class="btn btn-xs btn-warning"><i class="fa fa-trash bigger-120"></i>删除</a>
                                        </div>
                                    </td>
                                </tr>
                                <?php } ?>
                                </tbody>
                        </table>
                        <div>
                            <?php echo $page; ?>
                        </div>
                    </div><!-- /.row -->
                </div><!-- /.main-container -->
            </div>
        </div>
    </div>
</div>
